// 导入sequelize模块
const {Sequelize, DataTypes} = require('sequelize');
// 链接数据库
const sequelize = new Sequelize('food', 'ant', 'ant123456', {
    host: 'localhost',
    dialect: 'mysql'
  })

const AdminUser = sequelize.define('admin_user', {
    id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        primaryKey: true
    },
    username: {
        type: DataTypes.STRING,
        allowNull: false
    },
    mobile: {
        type: DataTypes.BIGINT,
        allowNull: true
    },
    email: {
        type: DataTypes.STRING
    },
    avatar: {
        type: DataTypes.STRING,
        allowNull: false
    },
    member_id: {
        type: DataTypes.INTEGER
    },
    status: {
        type: DataTypes.SMALLINT
    },
    created_at: {
        type: DataTypes.INTEGER
    },
    updated_at: {type: DataTypes.INTEGER}
},{
    freezeTableName: true
})

module.exports = AdminUser